package Assignment;

import java.util.Random;

public class Test4 {
    public static void main(String[] args) {
         int[] arr = new int[6];

        Random random = new Random();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = random.nextInt(10);
        }

        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
        System.out.println();

        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum =sum*10+arr[i];

        }

        System.out.println(sum);



    }
}
